{% extends "base.html" %}
{% block css %}
    <link href="static/css/duallistbox/bootstrap-duallistbox.css" rel="stylesheet">

{% endblock %}
{% block content %}

<main class="app-content">
    <div class="app-title">
        <div>
            <h1><i class="fa fa-edit"></i> New Scan</h1>
            <p>Create a new scan task</p>
        </div>
        <ul class="app-breadcrumb breadcrumb">
            <li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i></li>
            <li class="breadcrumb-item">Forms</li>
            <li class="breadcrumb-item"><a href="#">New Scan</a></li>
        </ul>
    </div>

    <div class="row">
        <div class="col-md-12">
            <div class="tile">
                <div class="row">
                    <div class="col-lg-2">
                    </div>
                    <div class="col-lg-8">
                        <form class="form-horizontal">
                            <div class="form-group row">
                                <label class="control-label col-md-3">Task Name <span class="text-danger">*</span></label>
                                <div class="col-md-9">
                                    <input class="form-control" name="taskname_val" type="text" placeholder="Task Name">
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="control-label col-md-3">Recursion </label>
                                <div class="col-md-9">
                                    <select class="form-control col-md-6" name="recursion_val" title="Recursion">
                                        <option value="0">Once</option>
                                        <option value="1">Every day</option>
                                        <option value="7">Every week</option>
                                        <option value="30">Every month</option>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="control-label col-md-3">Plugin Select <span class="text-danger">*</span></label>
                                <div class="col-md-9">
                                    <select multiple="multiple" size="7" name="plugin_list">
                                        {% for a in plugin_info %}
                                            <option value="{{ a['_id'] }}">{{ a['plugin_name'] }}</option>
                                        {% endfor %}
                                    </select>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="control-label col-md-3">Target <span class="text-danger">*</span></label>
                                <div class="col-md-9">
                                    <textarea class="form-control" name="target_val" rows="8" placeholder="Example:&#13;&#10;192.168.1.1&#13;&#10;192.168.1.0/24&#13;&#10;www.example.com"></textarea>
                                </div>
                            </div>
                        <button class="btn btn-primary" id="showConfig" type="button"><i class="fa fa-fw fa-lg fa-check-circle"></i>Submit</button>
                        </form>

                    </div>
                    <div class="col-md-2">

                    </div>
                </div>
            </div>
        </div>
    </div>
</main>

{% block js %}
    <script src="static/js/jquery/jquery.bootstrap-duallistbox.js"></script>
    <script src="static/js/plugins/sweetalert/sweetalert.min.js"></script>

    <script src="static/js/server/new-scan.js"></script>
{% endblock %}
{% endblock %}